package com.bjpowernode.dataservice.service;

import com.bjpowernode.commons.service.AccountService;
import com.bjpowernode.dataservice.mapper.AccountMapper;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

@DubboService
public class AccountServiceImpl implements AccountService {
    @Resource
    private AccountMapper accountMapper;

    public int updateBalance(Long userId, Double money) {
        return accountMapper.updateBalance(userId, money);
    }

    @Override
    public Double getBalance(Long id) {
        return accountMapper.getBalance(id);
    }

    public void addBalance(Long uid, Double money) {
        accountMapper.addBalance(uid, money);
    }
}
